package com.example.demo.util.converters.impl;

import com.example.demo.util.converters.MyConverter;
import com.example.demo.util.NumberUtil;
import org.springframework.stereotype.Component;

import java.lang.reflect.Field;

/**
 * @author 陈浩
 * @date 2021/1/9 15:12
 */

public class ShortMyConverter implements MyConverter<Short> {
    @Override
    public Short convertToJavaData(String value, Field declaredField) throws Exception {
        return NumberUtil.parseShort(value, declaredField);
    }

}
